/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.flexengine.utils;

import java.io.InputStream;

/**
 * @author Luann R. Athayde
 * @version 1.0
 * @since 1.0
 */
public class ResourceManager {

    public static final String DEFAULT_PATH  = "./resources/";
    public static final String LANGUAGE_PATH = "languages/";
    public static final String FONTS_PATH    = "fonts/";

    private static final ResourceManager instance;
    private static String  currentPath;
    
    static {
        instance = new ResourceManager();
        currentPath = DEFAULT_PATH;
    }

    private ResourceManager()   {
    }

    public static String getLocale(String name)  {
        return currentPath+name;
    }
    
    public static InputStream getResourceAsStream(String name) {
        return instance.getClass().getResourceAsStream(name);
    }

    public static void setCurrentPath(String currentPath) {
        ResourceManager.currentPath = currentPath;
    }
    
    public static String getCurrentPath() {
        return currentPath;
    }
    
}